<%--
  Created by IntelliJ IDEA.
  User: DongHuaYuan
  Date: 2024/1/15
  Time: 11:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>JSTL标签</title>
</head>
<body>
    <%--c:if: 来完成逻辑判断，替换java 中if else--%>


    <%--<c:if test="true">--%>
    <%--<h1>true</h1>--%>
    <%--</c:if>--%>

    <c:if test="${status ==1}">
        启用
    </c:if>

    <c:if test="${status !=1}">
        不启用
    </c:if>
    <hr/>
    <input type="button" value="新增"><br/>
    <hr/>
    <table border="1" cellpadding="0" width="800">
        <tr>
            <th>序号</th>
            <th>品牌名称</th>
            <th>企业名称</th>
            <th>排序</th>
            <th>品牌介绍</th>
            <th>状态</th>
            <th>操作</th>
        </tr>
        <%--<tr align="center">--%>
        <%--<td>1</td>--%>
        <%--<td>三只松鼠</td>--%>
        <%--<td>三只松鼠</td>--%>
        <%--<td>100</td>--%>
        <%--<td>三只松鼠，好吃不上火</td>--%>
        <%--<td> <a href="#">修改</a> <a href="#">删除</a></td>--%>
        <%--</tr>--%>
        <c:forEach items="${brands}" var="brand">
            <tr align="center">
                <td>${brand.id}</td>
                <td>${brand.brandName}</td>
                <td>${brand.companyName}</td>
                <td>${brand.ordered}</td>
                <td>${brand.description}</td>
                <c:if test="${brand.description}==1">
                    <td>"启用"</td>
                </c:if >

                <c:if test="${brand.description}!=1">
                    <td>"禁用"</td>
                </c:if >
                <td> <a href="#">修改</a> <a href="#">删除</a></td>
            </tr>
        </c:forEach>
    </table>

    <c:forEach begin="0" end="10" step="1" var="i">
        <h1>${i}</h1>
    </c:forEach>
</body>
</html>
